<?php


namespace App\Commons\Domain\Module\Coin\Model;


use App\Commons\Domain\Core\Model;
use App\Commons\Domain\Module\Financial\Model\Wallet;


/**
 * App\Commons\Domain\Module\Coin\Model\Coin
 *
 * @property int $id
 * @property \Illuminate\Support\Carbon $created_at
 * @property \Illuminate\Support\Carbon $updated_at
 * @property string $name 币种名称
 * @property string $en_name 英文名称
 * @property string $currency 货币单位
 * @property int $status 状态
 * @property int $scale 币种精度，小数点位数
 * @property string $min_recharge_amount 最小充值数量
 * @property string $max_withdraw_amount 最大提币数量
 * @property string $min_withdraw_amount 最小提币数量
 * @property float $sort_num 排序
 * @property-read \Illuminate\Database\Eloquent\Collection|Wallet[] $wallet
 * @property-read int|null $wallet_count
 * @method static \Illuminate\Database\Eloquent\Builder|Coin newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Coin newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Coin query()
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereCurrency($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereEnName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereMaxWithdrawAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereMinRechargeAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereMinWithdrawAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereScale($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereSortNum($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Coin whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class Coin extends Model
{
    /**
     * 币种钱包
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function wallet()
    {
        return $this->hasmany(Wallet::class, 'coin_id', 'id');
    }
}
